<template>
  <div>
    <div class="fyh" v-for="(item,index) in list" :key="index">
      <img src="../../assets/logo.png" alt />
      <div class="toom">
        <p>{{item.productName}}</p>
        <p>￥{{item.salePrice}}</p>
        <p>166人付款</p>
        <p class="pp">+</p>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      list: [],
    };
  },
  created() {},
  mounted() {
    this.xie();
  },
  methods: {
    xie() {
      this.$axios({
        url: "/data3.json",
      }).then((res) => {
        console.log(res);
        this.list = res.result.list;
      });
    },
  },
};
</script>

<style scoped lang="less">
.fyh {
  width: 100%;
  height: 1.2rem;
  display: flex;
  margin-top: 0.3rem;
  img {
    width: 1rem;
    height: 0.8rem;
  }
  .toom {
    width: 100%;
    position: relative;
    p {
      font-size: 0.16rem;
    }
    :nth-of-type(1) {
      font-size: 0.16rem;
    }
    :nth-of-type(2) {
      font-size: 0.16rem;
      color: #ac87f2;
    }
    .pp {
      position: absolute;
      right: 0.3rem;
      bottom: 0.2rem;
      width: 0.5rem;
      height: 0.5rem;
      border-radius: 50%;
      color: #ffffff;
      background-color: #ac87f2;
      font-size: 0.5rem;
      text-align: center;
      line-height: 0.5rem;
    }
  }
}
</style>
